This is my first ever effort to code something from scratch in JS. I'm self-taught (YouTube, FCC, some others) for the last 6 months. I'm changing life goals, I'm a graphic designer wanting to become full stack dev :)
The idea is to have measurements in an array, then multiply them using the scale value.
This is what I got:
const shape = [side1, side2, side3, side4];
let side1= (num);
let side2= (num);
let side3= (num);
let side4= (num);
}
let scale = (num);
function scaleShape(shape, scale) {
for (var i = 0 < shape.length; i++) {
shape[i] *= scale;
}
return shape;
}
return scaleShape();
Thanks everyone! ☺️👍